/* 活动详情页样式 */
:root {
    --primary-color: #3f51b5;
    --secondary-color: #2ecc71;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-radius: 10px;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: var(--text-color);
}

/* 页面头部 - 限制宽度并居中 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 2px 8px var(--shadow-color);
    z-index: 1000;
    /* 新增：限制最大宽度并居中 */
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
    /* -- */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.back-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    text-decoration: none;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.header-right {
    display: flex;
    gap: 16px;
}

.header-right i {
    font-size: 22px;
    color: #666;
    cursor: pointer;
}

.header-right i.active {
    color: #f1c40f;
}

/* 主要内容区域 */
.main-content {
    margin-top: 56px;
    margin-bottom: 70px;
}

/* 活动大图 */
.activity-banner {
    position: relative;
    width: 100%;
    height: 240px;
}

.activity-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activity-status {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    color: white;
    font-weight: 500;
    background-color: var(--primary-color);
    z-index: 2;
}

/* 活动基本信息 */
.activity-basic-info {
    padding: 15px;
    background-color: white;
    border-bottom: 1px solid var(--light-gray);
}

.activity-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
}

.activity-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 15px;
    color: #666;
}

.activity-info-item i {
    margin-right: 8px;
    color: #888;
    font-size: 16px;
}

.activity-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    padding: 4px 10px;
    background-color: var(--light-gray);
    border-radius: 16px;
    font-size: 13px;
    color: #666;
}

/* 内容卡片 */
.content-card {
    margin: 15px;
    background-color: white;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 2px 6px var(--shadow-color);
}

.card-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--light-gray);
}

.section-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.card-content {
    padding: 15px;
}

.card-content p {
    margin: 0 0 10px 0;
    line-height: 1.6;
    font-size: 15px;
    color: #555;
}

.card-content p:last-child {
    margin-bottom: 0;
}

/* 讲师列表 */
.speaker-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.speaker-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.speaker-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.speaker-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.speaker-info {
    flex: 1;
}

.speaker-name {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
}

.speaker-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #666;
}

.speaker-bio {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

/* 活动安排 */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.schedule-item {
    display: flex;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--light-gray);
}

.schedule-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.schedule-time {
    width: 90px;
    padding: 4px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
    flex-shrink: 0;
}

.schedule-content {
    flex: 1;
}

.schedule-content h3 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
}

.schedule-content p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* 相关活动 */
.related-activities {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 5px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.related-activities::-webkit-scrollbar {
    display: none;
}

.related-activity-item {
    min-width: 180px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px var(--shadow-color);
    background-color: white;
}

.related-activity-img {
    height: 100px;
}

.related-activity-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-activity-info {
    padding: 10px;
}

.related-activity-info h3 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-activity-info p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

/* 报名按钮容器 - 限制宽度并居中 */
.action-btn-container {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 60px; /* 保持在底部导航栏之上 */
    padding: 10px 15px;
    background-color: white;
    box-shadow: 0 -2px 8px var(--shadow-color);
    z-index: 900;
    /* 新增：限制最大宽度并居中 */
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
}

.action-btn {
    display: block;
    width: 100%;
    padding: 11px 0;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.action-btn:disabled {
    background-color: #999;
    cursor: not-allowed;
}

.action-btn:active {
    background-color: #303f9f;
}

/* 底部导航栏 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 8px var(--shadow-color);
    z-index: 1000;
    padding: 8px 0;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
    cursor: pointer;
    color: #666;
}

.tab-item.active {
    color: var(--primary-color);
}

.tab-item i {
    font-size: 22px;
    margin-bottom: 3px;
}

.tab-item span {
    font-size: 12px;
}

/* 报名弹窗 */
.register-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.register-modal.show {
    display: flex;
}

.register-container {
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.register-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.register-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: transparent;
    border: none;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.register-content {
    padding: 15px;
    overflow-y: auto;
    max-height: calc(90vh - 60px);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 500;
}

.required {
    color: #e74c3c;
    margin-left: 2px;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-chevron-down' viewBox='0 0 16 16'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.file-upload {
    position: relative;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    margin-top: 5px;
}

.file-upload input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #666;
}

.upload-button i {
    font-size: 24px;
    margin-bottom: 5px;
}

.file-name {
    margin-top: 8px;
    font-size: 14px;
    color: var(--primary-color);
    word-break: break-all;
    display: none;
}

.file-name.show {
    display: block;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 3px;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
    font-size: 14px;
    line-height: 1.4;
}

.text-link {
    color: var(--primary-color);
    text-decoration: none;
}

.form-actions {
    margin-top: 20px;
}

.submit-btn {
    width: 100%;
    padding: 12px 0;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:active {
    background-color: #303f9f;
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
}

/* 移除 iPhone 15 适配中对 .action-btn-container 的 max-width: 100% 设置 */
@media screen and (width: 390px) and (height: 844px) {
    /*
    .action-btn-container {
        max-width: 100%; // 移除此行或注释掉
    }
    */
    
    .tab-bar {
        padding-bottom: calc(var(--iphone-safe-area-bottom) - 10px);
    }
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f5f5f5;
        --light-gray: #333;
        --medium-gray: #444;
        --border-color: #555;
        --shadow-color: rgba(0, 0, 0, 0.3);
    }
    
    body {
        background-color: #121212;
    }
    
    .header,
    .activity-basic-info,
    .content-card,
    .action-btn-container,
    .tab-bar,
    .register-container {
        background-color: #1e1e1e;
    }
    
    .back-btn {
        color: #f5f5f5;
    }
    
    .header-right i {
        color: #bbb;
    }
    
    .activity-info-item,
    .activity-info-item i,
    .card-content p,
    .speaker-title,
    .speaker-bio,
    .schedule-content p,
    .related-activity-info p {
        color: #bbb;
    }
    
    .tag {
        background-color: #333;
    }
    
    .card-header,
    .activity-basic-info {
        border-color: #333;
    }
    
    .schedule-item {
        border-color: #444;
    }
    
    .register-header {
        border-color: #333;
    }
    
    .form-group input[type="text"],
    .form-group input[type="tel"],
    .form-group input[type="email"],
    .form-group select,
    .form-group textarea {
        background-color: #2a2a2a;
        border-color: #444;
        color: #f5f5f5;
    }
    
    .file-upload {
        border-color: #444;
    }
    
    .upload-button,
    .close-btn {
        color: #bbb;
    }
} 